let parser = (str)=>{
    let obj = {}
    str.replace(/([^?=&#]+)=([^?=&#]+)/g,function(){
        obj[arguments[1]] = arguments[2]
    })
    return obj
}
let stringify = (obj)=>{
    let ary = []
    for(let key in obj){
        ary.push(`${key}=${obj[key]}`)
    }
    return ary.join('&')
}

export {
    parser,
    stringify
}